package edu.gatech.cs2340.tigershroud;
import java.io.Serializable;

@SuppressWarnings("serial") //with this annotation we are going to hide compiler warning
/**
 * The Task class stores information for a specific task.
 * @author []
 * @version 9.0x, Build April 3, 2012.
 */
public class Task implements Serializable
{
	private long id;
	private String uname;
	private String tname;
	private String date;
	private String time;
	private long dnum;
	private String description;
	private String category;
	private String address;
	private String city;
	private String state;
	private String zip;
	private String status;
	private String priority;
	private boolean select;
	
	/**
	 * Getter for the id.
	 * @return the id number of the task
	 */
	public long getID()
	{
		return id;
	}
	
	/**
	 * Getter for the username.
	 * @return the username of the task'a creator
	 */
	public String getUserName()
	{
		return uname;
	}
	/**
	 * Getter for the task name
	 * @return the name of the task's name.
	 */
	public String getTaskName()
	{
		return tname;
	}
	/**
	 * Getter for the description.
	 * @return the description of the task
	 */
	public String getDescription()
	{
		return description;
	}
	
	/**
	 * Getter for the date
	 * @return the date of the task.
	 */
	public String getDate()
	{
		return date;
	}
	/**
	 * Getter for the time
	 * @return the timw of the task.
	 */
	public String getTime()
	{
		return time;
	}
	
	/**
	 * Getter for the []
	 * @return the [] of the task.
	 */
	public long getDnum()
	{
		return dnum;
	}
	
	/**
	 * Getter for the category.
	 * @return the category of the task.
	 */
	public String getCategory()
	{
		return category;
	}
	/**
	 * Getter for the address.
	 * @return the address of the task.
	 */
	public String getAddress()
	{
		return address;
	}
	/**
	 * Getter for the city.
	 * @return the city of the task.
	 */
	public String getCity()
	{
		return city;
	}
	/**
	 * Getter for the state.
	 * @return the state of the task.
	 */
	public String getState()
	{
		return state;
	}
	/**
	 * Getter for the zip code.
	 * @return the zip code of the task.
	 */
	public String getZipCode()
	{
		return zip;
	}
	
	/**
	 * Getter for the status.
	 * @return the status of the task.
	 */
	public String getStatus()
	{
		return status;
	}
	
	public String getPriority()
	{
		return priority;
	}
	
	/**
	 * Setter for the id.
	 * @param i The new id number
	 */
	public void setID(long i)
	{
		id = i;
	}
	
	/**
	 * Setter for the username.
	 * @param unam The new username.
	 */
	public void setUserName(String unam)
	{
		uname = unam;
	}
	/**
	 * Setter for the task name.
	 * @param tnam The new task name.
	 */
	public void setTaskName(String tnam)
	{
		tname = tnam;
	}
	/**
	 * Setter for the description.
	 * @param i The new id description.
	 */
	public void setDescription(String des)
	{
		description = des;
	}
	/**
	 * Setter for the date.
	 * @param dat The new dater
	 */
	public void setDate(String dat)
	{
		date = dat;
	}
	/**
	 * Setter for the time.
	 * @param tim The new time.
	 */
	public void setTime(String tim)
	{
		time = tim;
	}
	/**
	 * Setter for the [].
	 * @param i The new [].
	 */
	public void setDnum(long dnu)
	{
		dnum = dnu;
	}
	/**
	 * Setter for the category.
	 * @param cat The new category.
	 */
	public void setCategory(String cat)
	{
		category = cat;
	}
	/**
	 * Setter for the address.
	 * @param addr The new id address.
	 */
	public void setAddress(String addr)
	{
		address = addr;
	}
	/**
	 * Setter for the city.
	 * @param cit The new city.
	 */
	public void setCity(String cit)
	{
		city = cit;
	}
	/**
	 * Setter for the state.
	 * @param sta The new id state/
	 */
	public void setState(String sta)
	{
		state = sta;
	}
	/**
	 * Setter for the zipcode.
	 * @param zi The new zipcode.
	 */
	public void setZipCode(String zi)
	{
		zip = zi;
	}
	/**
	 * Setter for the status.
	 * @param stat The new id status.
	 */
	public void setStatus(String stat)
	{
		status = "" + stat;
	}
		
	public void setPriority(String prior)
	{
		priority = prior;
	}
	
	public boolean isSelected()
	{
		return select;
	}
	
	public void setSelected(boolean sele)
	{
		select = sele;
	}
	
	/**
	 * The toString method returns a string representing the task.
	 * @param i The new id number
	 */
	@Override
	public String toString() {
		String tostring = "";
		if(status != null){
			if (status.equals("1")){
				tostring = "Complete   |";
			} else { 
				tostring = "Incomplete |";
			}
			tostring = tostring + "  " + tname;
			return tostring;
		}
	return tname;
	}
}
